package T3.BusquedaDeRaices;

public class Example {

    public static void main(String[] args) {
        float solution;
        try {
            solution = RootSolver.solve(new Linear(1,1), -10,10);
            System.out.println("La solución es " +solution);
            
            solution = RootSolver(new Parabola(1,0,-4), 0,10);
            System.out.println("La solucion es " +solution);
            
            solution = RootSolver.solve(new ERisedToXMinusX(1,1), -10, 10);
            System.out.println("La solucion es: " +solution);
            
            //No hay raices en este intervalo
            solution = RootSolver.solve(new ERisedToXMinusX(1, 1),1,10);
            System.out.println("La solucion es: " +solution);
        } catch(NonValidIntervalException ex){
            System.out.println("Error: " + ex);
            ex.printStackTrace();
        }
    
}
